package com.ecube.protocol.pv;

import com.alibaba.fastjson.annotation.JSONField;
import com.ecube.protocol.common.ProtocolFunction;
import com.ecube.protocol.enums.PvFunctionEnum;
import lombok.Data;

import java.util.List;

/**
 *
 *
 * @author zhuweijun
 * @version 1.0.0
 * @since 2025/7/31 18:37
 */
@Data
@ProtocolFunction(type = PvFunctionEnum.class, value = "INVERTER_STATE")
public class PvInverterState {

    /**
     * 总有功功率
     */
    private Float P = 100.F;
    /**
     * 总无功功率
     */
    private Float Q = 0.0F;
    /**
     * 功率因数
     */
    @JSONField(name = "PF")
    private Float PF = 1.0F;

    /**
     * A相有功功率
     */
    @JSONField(name = "Pa")
    private Float Pa = 200.0F;
    /**
     * B相有功功率
     */
    @JSONField(name = "Pb")
    private Float Pb = 0.0F;
    /**
     * C相有功功率
     */
    @JSONField(name = "Pc")
    private Float Pc  = 0.0F;
    /**
     * A相无功功率
     */
    @JSONField(name = "Qa")
    private Float Qa = 200.0F;
    /**
     * B相无功功率
     */
    @JSONField(name = "Qb")
    private Float Qb;
    /**
     * C相无功功率
     */
    @JSONField(name = "Qc")
    private Float Qc;

    /**
     * 频率
     */
    private Float F = 100.F;
    /**
     * 总发电量
     */
    @JSONField(name = "Et")
    private Float Et = 1200.0F;
    /**
     * 日总发电量
     */
    @JSONField(name = "Ed")
    private Float Ed = 500.0F;
    /**
     * A相电压
     */
    @JSONField(name = "Ua")
    private Float Ua = 250.F;
    /**
     * B相电压
     */
    @JSONField(name = "Ub")
    private Float Ub = 250.F;
    /**
     * C相电压
     */
    @JSONField(name = "Uc")
    private Float Uc = 250.F;
    /**
     * A相电流
     */
    @JSONField(name = "Ia")
    private Float Ia = 2.5F;
    /**
     * B相电流
     */
    @JSONField(name = "Ib")
    private Float Ib = 2.5F;
    /**
     * C相电流
     */
    @JSONField(name = "Ic")
    private Float Ic = 2.5F;

    /**
     * 电压
     */
    private List<Float> listU;
    /**
     * 电流
     */
    private List<Float> listI;

    /**
     * 功率
     */
    private List<Float> listP;

    /**
     * IGBT温度
     */
    private Float igbtTemp = 25.1F;
    /**
     * 控制板温度
     */
    private Float cbTemp = 26.2F;
    /**
     * 散热器温度
     */
    private Float radTemp = 26.2F;

    /**
     * 防逆流状态
     */
    private Integer arfState = 1;

    /**
     * 防逆流A相电流
     */
    private Float arfIa = 22.1F;

    /**
     * 防逆流B相电流
     */
    private Float arfIb = 22.1F;

    /**
     * 防逆流C相电流
     */
    private Float arfIc = 22.1F;

    /**
     * 逆变器状态: 0：待机；1：检测；2：运行；3：故障；4：关闭；
     */
    private Integer inverterState = 2;

    /**
     * 总馈电量
     */
    private Float feedEt = 200.F;

    /**
     * 日馈电量
     */
    private Float feedEd = 500.F;

    /**
     * 馈电功率
     */
    @JSONField(name = "Pfeed")
    private Float Pfeed = 0.4F;
    /**
     * 总耗电量
     */
    @JSONField(name = "EtCons")
    private Float EtCons = 14200.5F;
    /**
     * 日耗电量
     */
    @JSONField(name = "EdCons")
    private Float EdCons = 5021.1F;
}
